//用户接口相关
import request from "./request";

export const getUser = () => request.get("/user/info");

export const updateCurrent = (data) => request.put("/user/current", data); // 更新当前用户信息

export const updateCurrentPassword = (data) =>
  request.put("/user/current/password", data); // 修改当前用户密码\

export const getUsers = (params = {}) => request.get("/user/list", { params });

export const updateUser = (data) => request.put("/user", data);

export const updateUserDisable = (data) => request.put("/user/disable", data);

export const getOnlineUsers = () => request.get("/user/online"); // 在线用户列表

export const forceOfflineUser = (data) =>
  request.delete("/user/offline", { data }); // 强制离线
